package org.luxor.cloud.authentication.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
import java.io.Serializable;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.luxor.commons.core.validator.group.UpdateGroup;


/**
 * 客户端与可访问资源的关联关系
 *
 * @author sunlightcs @date 2020-10-18 21:19:26
 */
@Data
@TableName("tb_oauth_client_resource_ref")
@ApiModel(description = "客户端与可访问资源的关联关系")
public class OauthClientResourceRefEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@TableId(type = IdType.ID_WORKER)
	@ApiModelProperty(value = "主键Id")
	@JSONField(serializeUsing = ToStringSerializer.class)
	@NotNull(message = "id，不能为空", groups = UpdateGroup.class)
	private Long id;

	@ApiModelProperty(value = "客户端ID")
	private String clientId;

	@ApiModelProperty(value = "资源提供方ID")
	private String resourceId;

}
